package com.diy.sigmund.diycommon.spring.extensionpoint.event;

import org.springframework.context.ApplicationEvent;

/**
 * 自定义事件
 *
 * @author ylm-sigmund
 * @since 2022/9/21 10:38
 */
public class EmailEvent extends ApplicationEvent {

    /** 邮件地址 */
    private String address;
    /** 邮件内容 */
    private String text;

    /**
     * Create a new {@code ApplicationEvent}.
     *
     * @param source the object on which the event initially occurred or with
     *               which the event is associated (never {@code null})
     */
    public EmailEvent(Object source) {
        super(source);
    }

    public EmailEvent(Object source, String address, String text) {
        super(source);
        this.address = address;
        this.text = text;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }
}
